{% extends "base.html" %}
{% block title %} {{category.name}} - {{blog.title}} {% endblock %}
{% block content %}

<div id = "section">
	<div id="content">

	<div id = "RandomShow">
	<script language="JavaScript" type="text/javascript">
tips = new Array(3);
tips[0] = '<img alt="" width="860" height="120" src="/themes/{{ blog.theme_name }}/images/stushow1.jpg" border="0" />';
tips[1] = '<img alt="" width="860" height="120" src="/themes/{{ blog.theme_name }}/images/stushow2.jpg" border="0" />';
tips[2] = '<img alt="" width="860" height="120" src="/themes/{{ blog.theme_name }}/images/stushow3.jpg" border="0" />';

index = Math.floor(Math.random() * tips.length);
document.write(tips[index]);
</script>
	</div>
		<div class="postlist">
			<div id = "section">
			<div class = "archive">
			<span class = "title">
			<h3>On classification&#8216;{{category.name}}&#8217; All posts</h3>
			</span>
			</div>
			{% if entries %}
			{% for entry in entries %}
			<div id = "article">
			<div id="post-{{entry.key}}">
				<div class="title">
				 <h3>{{ entry.date|datetz:"F jS, Y " }}</h3>
					<h2>
						<a href="/{{ entry.link|escape }}" rel="bookmark" title="Permanent link to {{entry.title|escape}}">{{entry.title|escape}}
						</a>
					</h2>
					<small>
					<a href="/{{entry.link|escape}}#comments">{{entry.commentcount}} Comments</a>, {%for cate in entry.categories%} <a href="/category/{{cate.slug}}">{{cate.name}}</a> {%endfor%}
					,<a href="/{{entry.link|escape}}"> {{entry.readtimes}} Reads</a>.{%if self.is_admin%}<a href="{{entry.edit_url}}">Editor</a> | {%endif%}
					</small>
				</div>
				{% if entry.tags%}
				<p class="postmeta">
					Label：{%for tag in entry.tags%}
					<a href="/tag/{{tag|urlencode}}">{{tag}}</a>&nbsp;{%endfor%}
				</p>
				{%endif%}
			</div> </div>
			{% endfor %}
		</div>
		<div id = "nav">
			<div class="navigation">
					<span class="pages">{{pageindex}}</span>
					{% if pager.prev %}<a href="?page={{ pager.prev}}" >&laquo;Previous</a>{% endif %}
					{% if pager.next %}<a href="?page={{ pager.next }}" >Next&raquo;</a>{% endif %}
			</div>
			    <div class="clear"></div> 
		</div>
		{% else %}
		<div id = "article">
			<div class="title">
				<h2>Not Found</h2>
			</div>
			<div class="entry">
				<p>Sorry, your view is not here, try to use the sidebar search tool。</p>
						    <div class="clear"></div>
			</div>
		</div>
		{% endif %}
	</div>
{% include "sidebar.html" %}
<div class="clear"></div>  
</div>
{% endblock %}